Skip to content

proof(L1): close ADMIT 2 — remove false region_liveness lemma (4→3 admits) + v2 proof audit#322

Merged
hyperpolymath merged 1 commit into
mainfrom
claude/v2-grammar-proofs-audit-5lubzc
Jun 26, 2026
Merged

proof(L1): close ADMIT 2 — remove false region_liveness lemma (4→3 admits) + v2 proof audit#322
hyperpolymath merged 1 commit into
mainfrom
claude/v2-grammar-proofs-audit-5lubzc

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

A ground-truth audit of every v2 proof in the repo (rebuilt coqc 8.18.0, Print Assumptions on every keystone — not doc-trust), plus one real closure: the provably-false region_liveness_at_split_l1_gen lemma is removed and its consumers re-routed through the true graded lemma. Outer Admitted. count: 4 → 3.

Everything here is mechanically verified — only proofs that actually compile + pass Print Assumptions are claimed.

What ran (provers installed in-session)

Prover Status
Coq 8.18.0 (apt) ✅ all 15 formal/*.v compile (exit 0); Print Assumptions audited
Idris2 ❌ not installable here — no apt pkg, GitHub source clone 403-blocked by network policy. ABI proofs (E1–E6) not run
Rust v2 grammar phase tests ✅ phases d/e/f/gh/i/j + wasm_e2e all pass (with the optional typed-wasm-verify git dep — itself 403-blocked — disabled; not part of this diff)

The closure (the substantive change)

region_liveness_at_split_l1_gen asserted In rv R -> In rv R' unconditionally, which is false in the T_Region_Active_L1 r = rv sub-case (witness ERegion rv (EI32 5) at R = [rv]). It sat Admitted and was consumed at 13 sites in subst_typing_gen_l1_m.

This PR realises the honest closure the source's own 2026-06-16 call-site audit prescribed:

  • Adds an honest val_region_no_exit v e premise to subst_typing_gen_l1_m, threaded through subst_typing_gen_l1 / subst_preserves_typing_l1 and the L2 β-case lemmas preservation_l2_app_eff_beta_linear / _l1.
  • The 13 sites now discharge region liveness through the true, Qed region_liveness_no_exit_l1_gen (proved from cnt-monotonicity).
  • Deletes the false lemma + its wrapper. The false general statement remains pinned as a negative result alongside Counterexample_RegionShrink.v.

Verified outcome (Print Assumptions)

  • formal/ outer Admitted.: 4 → 3 — only the sacrosanct legacy Semantics.v preservation, step_pop_disjoint_from_type_l1, and the preservation_l1 capstone remain.
  • The substitution chain and both L2 β-case lemmas flip from "depends on a false axiom" to "Closed under the global context" (axiom-free, now carrying the honest premise).
  • preservation_l3 stays unconditionally axiom-free.
  • scripts/status-gate.sh --proofs passes (the marker was stale at 5; corrected to ground-truth 3).

Files

  • formal/Semantics_L1.v — premise + 13-site rethread; false lemma removed; audit comments updated.
  • formal/TypingL2.v — premise threaded through the two β-case lemmas.
  • PROOF-NEEDS.md — §4 marker 5 → 3, per-file table + parenthetical reconciled to coqc ground truth.

Scope / fences

This is the sanctioned per-layer reformulation (PROOF-NEEDS.md §5.4 / the in-source ADMIT-2 audit), not patching the legacy judgment. The remaining step_pop (eliminator-fork research) and preservation_l1 (capstone, gated on step_pop) are left fenced, with the residual region-liveness-through-reduction obligation now sitting explicitly as the val_region_no_exit premise preservation_l1 will owe.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AGFqWzByua4dKbA7W7oVsL


Generated by Claude Code

… the honest val_region_no_exit reformulation

The provably-false region_liveness_at_split_l1_gen (asserting
In rv R -> In rv R' unconditionally; false in the T_Region_Active_L1
r = rv sub-case, witness ERegion rv (EI32 5) at R = [rv]) is removed.
Its 13 consumers in subst_typing_gen_l1_m now route region liveness
through the TRUE, Qed region_liveness_no_exit_l1_gen, supplied with a
new honest premise val_region_no_exit threaded through the substitution
chain (subst_typing_gen_l1_m / subst_typing_gen_l1 /
subst_preserves_typing_l1) and the L2 beta-case lemmas
(preservation_l2_app_eff_beta_linear / _l1).

Verified by rebuilt coqc 8.18.0 + Print Assumptions:
- formal/ outer Admitted: 4 -> 3. region_liveness removed; only the
  sacrosanct legacy Semantics.v preservation, step_pop, and the
  preservation_l1 capstone remain.
- The substitution chain and both L2 beta-case lemmas flip from
  "depends on a false axiom" to "Closed under the global context"
  (axiom-free, carrying the honest premise instead).
- preservation_l3 stays unconditionally axiom-free.

This is the sanctioned honest closure recorded in Semantics_L1.v's
2026-06-16 call-site audit and PROOF-NEEDS.md, not ad-hoc patching of
the legacy judgment.

Also corrects the PROOF-NEEDS.md §4 status-gate marker to ground truth
(was 5, now 3; scripts/status-gate.sh --proofs passes) and reconciles
the per-file table + the in-source audit comments.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AGFqWzByua4dKbA7W7oVsL
@hyperpolymath
hyperpolymath marked this pull request as ready for review June 26, 2026 21:13
@hyperpolymath
hyperpolymath merged commit 47c8092 into main Jun 26, 2026
17 of 20 checks passed
@hyperpolymath
hyperpolymath deleted the claude/v2-grammar-proofs-audit-5lubzc branch June 26, 2026 21:13
hyperpolymath added a commit that referenced this pull request Jun 27, 2026
…SPDX + trusted-base) (#329)

## Summary

Two governance checks have been red on **every** PR (#322#324) for
reasons unrelated to any diff — both are repo-level. This clears the two
that are in ephapax's control. Fixes were derived from the **exact
`standards@d135b05` check-script regexes** (fetched via raw HTTPS and
verified locally, not guessed).

### 1. `governance / Licence consistency`
Root `LICENSE` is the verbatim MPL-2.0 text with **no SPDX header**.
`check-licence-consistency.sh` does:
```sh
grep -m1 -E '^[[:space:]]*SPDX-License-Identifier:' "$lic_file"
```
then normalises the identifier and checks it matches the manifest.
**Fix:** prepend `SPDX-License-Identifier: MPL-2.0` (normalises to
`mpl-2.0`, matches `Cargo.toml` `license = "MPL-2.0"`). Verified the
grep now matches.

### 2. `governance / Trusted-base reduction policy`
`check-trusted-base.sh` flags `^[[:space:]]*(Axiom|Admitted|admit\.)`.
`formal/RegionEnvL1.v:17` is a **prose comment** — *"Axiom budget: this
file is axiom-free"* — that happens to start with "Axiom". A false
positive. **Fix:** reword to *"On the axiom budget: …"* so the line no
longer matches (verified).

Chosen over a `.trusted-base-ignore` entry deliberately: the file stays
**fully scanned**, so a genuine future axiom there is still caught — and
a `TRUSTED:`/`AXIOM:` inline annotation would be *false* (the file
really is axiom-free; that's the whole point of `RegionEnvL1.v`).

## Not fixable here
`scan / Hypatia Neurosymbolic Analysis` fails on an Elixir
`CompileError` (`real_subdirs`) **inside the `standards`/Hypatia repo**
— out of ephapax's reach. Flagging, not fixing.

## Verification
- Both fixes checked against the actual fetched regexes
(`standards@d135b05`).
- `formal/RegionEnvL1.v` still compiles under `coqc 8.18.0`
(comment-only change).
- 2 files, +3/−1.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01AGFqWzByua4dKbA7W7oVsL

---
_Generated by [Claude
Code](https://claude.ai/code/session_01AGFqWzByua4dKbA7W7oVsL)_

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants